<template>
    <div>
      
        <div style="width:100%;height:.8rem;"></div>
        <div class="nolist" v-if="order_income.length <=0">
          <span>暂无数据...</span>
        </div>
       <div v-else class="position" v-for="(item,index) in order_income" :key="index">
             <div class="position_list">
             <div class="list_name">
                 <span>账户：</span>
                 <span>{{item.user_id}}</span>
             </div>
             <div class="list_text">
                 <div> <span>变动金额：</span><span>{{item.price}}</span>  </div>
                <div><span>余额：</span><span>{{item.balance}}</span></div>
             </div>
               <div class="list_text">
                 <div> <span>类型：</span><span>{{item.type}}</span>  </div>
             </div>
             
             <div class="list_text">
                <div class="text_last"><span>创建时间：</span><span>{{item.created_at}}</span></div>
             </div>
         </div>
         
       </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
order_income:[],
        }
    },mounted(){
        this.get_order_income();

    },
    methods:{
    get_order_income() {
      var that = this;
      that
        .$http({
          //调用接口
          method: "GET",
          headers: {
            "Content-Type": "application/json; charset=UTF-8"
          },
          data: that.param,
          url: that.$serverUrl + "/capitals"
        })
        .then(res => {
          that.order_income = res.data.data;
          // console.log(that.order_income)
        });
    },
 
        back(){
            this.$router.go(-1)
        }
    }
}
</script>

<style scoped>
.position{
    width: 100%;
    height: 3rem;
    background: #f3f3f3;
    display:flex;
    justify-content: space-between;
     margin-top: .5rem;
     border-bottom: 1px solid #e0e0e0;
      border-top: 1px solid #e0e0e0;
    
}
.position_list{
    width: 100%;
    height: 3.5rem;
   
   
}
.list_name{
    width: 100%;
    height: .8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .375rem;
    padding: 0 .3rem;
    box-sizing: border-box;
    color: #26a2ff;
    }
    .list_text{
        width: 100%;
        height: .6rem;
            display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 .3rem;
    box-sizing: border-box;
    font-size: .3rem;
    color: #666;
    }
    .text_last{
            color: #333;
    margin-top: 0.2rem;
    }
       .nolist{
          font-size: .45rem;
    letter-spacing: 2px;
    color: #666;
    text-align: center;
    margin-top: 3rem;
    }
</style>
